home *** CD-ROM | disk | FTP | other *** search
-
-
- -- meteor description
- function effects_meteorfall()
- local meteor = uniGetExecutor()
- local pos = meteor:getWorldPosition()
- local dir = D3DXVECTOR3:new(0.0,-1.0,0.0)
- meteor:setLocalPosition(pos.x - dir.x * 1200,pos.y - dir.y * 1200,pos.z - dir.z * 1200)
- local track = meteor:addSimpleEffect(ENET_EFFECT_PS_ENVIRONMENT_GREENDEVIL)
- meteor:play3DSound("gd_approach.wav",0)
- waitDeath(meteor:linearFlyD(dir,450))
- dir:delete()
- track:suspendedDestroy(6.0)
- local ht = getHeightType(meteor:getWorldPosition());
-
- -- getCamera():shake(1.0,6.0)
- if(ht ~= ENBHT_WATERHIT) then
- meteor:play3DSound("gd_explode.wav",0)
- end
- -- explosion mark
- if(ht ~= ENBHT_WATERHIT) then
- meteor:play3DSound("air_bomb_waterhit.wav",0)
- local exp_mark = meteor:addSimpleEffect(ENET_EFFECT_DYNAMICGEOMETRY_EXPLOSIONMARK_BIG)
- local exp_ring = meteor:addSimpleEffect(ENET_EFFECT_SP_ENVIRONMENT_EXPLOSION_DEVILRING)
- local exp_exp = meteor:addSimpleEffect(ENET_EFFECT_PS_ENVIRONMENT_EXPLOSION_DEVILHIT)
- exp_ring:suspendedDestroy(0.8)
- exp_exp:suspendedDestroy(4.0)
- exp_mark:delayedDestroy(70.0)
- exp_mark:setTransformOwner()
- else
- meteor:addSimpleEffect(ENET_EFFECT_PS_BOMB_WATERHIT):suspendedDestroy(2.0)
- end
- pause(3.0)
- meteor:destroy()
- end
-
- desc = getEffectDescriptionP(ENET_EFFECT_METEORFALL)
- desc.onCreate = "effects_meteorfall"
- desc.ClassID = ENCLASS_DUMMY
- desc.EffectClassType = ENECT_GEOMETRY
-
- desc.ScriptSet = ENSCRIPTSET_METEORFALL
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd1 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd1
- vzbzd1:delete()
-
- desc.MoveType = ENMOVE_FLY
-
- desc.ActivityType = ENACT_ACTIVE
-
- -- meteors emitter description
- desc = getEffectDescriptionP(ENET_EFFECT_METEORSEMITTER)
- desc.ClassID = ENCLASS_UNKNOWN
- desc.EffectClassType = ENECT_EFFECTSEMITTER
- desc.ActivityType = ENACT_ACTIVE
-
- desc.ScriptSet = ENSCRIPTSET_UNKNOWN
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd2 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd2
- vzbzd2:delete()
-
- emitterdesc = desc.EffectsEmitter
- emitterdesc.EmitEffectType = ENET_EFFECT_METEORFALL
- emitterdesc.EffectsPerSecond = 2
-